
//
//  SettleDeliverPlate.m
//  ProjectforHDX
//
//  Created by motom on 16/8/26.
//  Copyright © 2016年 H.DX. All rights reserved.
//

#import "SettleDeliverPlate.h"

@implementation SettleDeliverPlate


-(void)setAttributes:(NSDictionary *)userInfo{
    
    [super setAttributes:userInfo];
    
    //获取所有属性 ，遍历 给属性赋值
    NSArray *names = [NSArray gethdxProperties:[self class]];
    for (NSString *name in names) {
        if ([name isEqualToString:@"partID"]) {
            [self  setValue:[userInfo objectForKey:@"id"] forKey:name];
        }
        else{
            [self  setValue:[userInfo objectForKey:name] forKey:name];
        }
    }
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        [self  setValue:value forKey:@"partID"];

    }

}

@end
